#pragma once

struct EnumItem;
class EnumList;

class RealIEnumVARIANT : public IEnumVARIANT
{
public:
    RealIEnumVARIANT(EnumList *pList);
    ~RealIEnumVARIANT();
    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv);
    ULONG STDMETHODCALLTYPE AddRef();
    ULONG STDMETHODCALLTYPE Release();
    HRESULT STDMETHODCALLTYPE Next(ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched);
    HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
    HRESULT STDMETHODCALLTYPE Reset();
    HRESULT STDMETHODCALLTYPE Clone(IEnumVARIANT **ppEnum);

public:
    EnumItem *m_pCurItem;

private:
    DWORD m_count;
    EnumList *m_list;
};